<%@ page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="/WEB-INF/jsp/common/include/taglibs.jsp"%>
<script type="text/javascript">

$(document).ready(function(){

});

//데이터 저장
function submitData(){
	getEnc();
	$("#hp").val($("#hp").val().split("-").join(""));
	$.ajax({
		url: "./insertUsr.do",
		dataType: "json",
		data:$("#frm").serialize(),
		success : function (json){
			if("0"==json.returnCd){
				showMsg("저장되었습니다");
			}else{
				showMsg("저장실패");
			}
		},
		error : function(error){
			seqChk = true;
			alert('접속지연이 발생했습니다. 몇분후에 다시 확인해주세요\n'+error);
		}
	});
	
}
function goList(){
	location.href="./main.do";
}
function getEnc(){
	if(window.hwInfo){
		$("#enc").val(window.hwInfo.getInfo());	
	}
}

function showMsg(msg){
	if(window.hwInfo){
		$("#enc").val(window.hwInfo.showMsg(msg));	
	}else{
		alert(msg);
	}
}
</script>


<form id="frm" action="./insertUsr.do" method="post" >

<table width="900" border="0" cellspacing="1" cellpadding="2">
	<form name="search" action="/admin/index.php?menu=pension">
		<input type="hidden" name="menu" value=pension> <input
			type="hidden" name="mode" value="list">
		<tr>
			<td align="left">검색 <select name="type">
					<option value="p_name">
						이름</a>
					<option value="p_id">
						아이디</a>
			</select> <script>
				var str = "";
				if (str.length >= 1)
					document.search.type.value = ""
			</script> <input name="key" value="" size="20"> <input type=submit
				value="찾기">
			</td>

			<td align="right"><a href="./intAdmin.do">[생성]</a></td>
		</tr>
	</form>
</table>

<table width="900" border="0" cellspacing="1" cellpadding="2"
		class="class_admin_table">
		<tr height="25" class="class_admin_table_head">
			<td align="center" width="100" rowspan="2">업종</td>
			<td align="center" width="150" rowspan="2">업소명</td>
			<td align="center"  rowspan="2">회원정보</td>
			<td align="center" width="150" colspan="3">콜정보</td>
			<td align="center" width="30"  rowspan="2">오늘 콜</td>
			<td align="center" width="80"  rowspan="2">콜통계</td>
			<td align="center" width="100" rowspan="2">사용료</td>
			<td align="center" width="50" rowspan="2">문자</td>
			<td align="center" width="50" rowspan="2">엑셀업로드</td>
		</tr>
		<tr height="25" class="class_admin_table_head">
			<td align="center" >단골</td>
			<td align="center" >타업소</td>
			<td align="center" >신규</td>
		</tr>
		
	<c:if test="${list !=null && fn:length(list)>0 }">
		<c:forEach var="data" items="${list}" varStatus="status">
		<tr height="25" class="class_admin_table_blank">
			<td align="center">${data.type_name }</td>
			<td align="left"><a href="./udtUsr.do?adm_seq=${data.adm_seq }">${data.company }</a></td>
			<td align="center">
				${data.user_cnt }번
			</td>
			<td align="center">${data.mem_cnt }</td>
			<td align="center">${data.now_cnt - (data.now_cnt - data.etc_cnt) -data.mem_cnt  }</td>
			<td align="center">${data.now_cnt - data.etc_cnt }</td>
			<td align="center">
				${data.now_cnt }
			</td>
			<td align="center">보기</td>
			<td align="center">${data.pay_use }</td>
			<td align="center">보내기</td>
			<td align="center"><a href="./importExcel.do?adm_seq=${data.adm_seq }">엑셀업로드</a></td>
		</tr>				
		</c:forEach>
	</c:if>

</table>

</form>
